<template>

	  	<Carousel autoplay v-model="value2" loop >
        <CarouselItem>
            <div class="demo-carousel"  ><img :width="screenWidth" :height="screenHeight"  src="../assets/banner_bg_121.jpg"></div>
        </CarouselItem>
        <CarouselItem>
            <div class="demo-carousel" ><img  :width="screenWidth"  :height="screenHeight"  src="../assets/banner_bg_121.jpg"></div>
        </CarouselItem>
        <CarouselItem>
            <div class="demo-carousel" ><img :width="screenWidth"  :height="screenHeight"   src="../assets/banner_bg_121.jpg"></div>
        </CarouselItem>
        <CarouselItem>
            <div class="demo-carousel" ><img  :width="screenWidth"  :height="screenHeight"  src="../assets/banner_bg_121.jpg"></div>
        </CarouselItem>
    </Carousel>

</template>

<script>
	 export default {
   data() {
      return {
        screenWidth: document.body.clientWidth, // 屏幕尺寸
        screenHeight: document.body.clientHeight-280, // 屏幕尺寸
      }
    },
// 钩子函数
mounted () {
      const that = this
      window.onresize = () => {
        return (() => {
          window.screenWidth = document.body.clientWidth
          that.screenWidth = window.screenWidth
          window.screenHeight = document.body.clientHeight-280
          that.screenHeight = window.clientHeight-180
        })()
      }
    }
  }

</script>

<style>
</style>